REGISTER tw.jar;
log0 = LOAD '/hnbc/' USING PigStorage('\u0001') AS (line:chararray);
log1 = FOREACH log0 GENERATE FLATTEN(com.tw.udf.LogFormat(line)) as 
																	(datetime:chararray,
																	requesttime:chararray,
																	domain:chararray,
																	requesturl:chararray,
																	srcip:chararray,
																	srcprovince:chararray,
																	srcisp:chararray,
																	srciprange:chararray,
																	destip:chararray,
																	destprovince:chararray,
																	destisp:chararray,
																	destiprange:chararray,
																	type:chararray,
																	os:chararray,
																	browser:chararray,
																	referer:chararray,
																	phone:chararray);
log2 = GROUP log1 BY destip;
log3 = FOREACH log2 GENERATE group;
STORE log3 INTO '/tw/warehouse/destips/' USING PigStorage();